/*
 * @# shows.js 2011-12-28 上午09:36:31
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */
/**
 * 秀场.
 */
$(function() {
	
	$('#favor-list li').hover(function(e) {
		$('[data-role="menu"]', this).fadeIn();
	}, function(e) {
		$('[data-role="menu"]', this).fadeOut();
	});
	
	$('#favor-list [data-menu="remove"]').click(function(e) {
		var albumId = $(this).attr('data-album-id'),
			photoId = $(this).attr('data-photo-id');
		$.post(window.ctx + '/albums/' + albumId + '/favors/photos/' + photoId + '/remove', function(feedback) {
			if (feedback.successful) {
				$('#photo-' + photoId).remove();
			}
		});
		return false;
	});
	
});
